import Vue from 'vue'
import Router from 'vue-router'
import Layout from '../views/layout/Layout'
import BlankLayout from '../views/layout/BlankLayout'

Vue.use(Router)

export const constantRouterMap = [
  {
    path: '/',
    component: Layout,
    redirect: '/chat',
    name: 'Chat',
    children: [{
      path: 'chat',
      component: () => import('../views/chat')
    }]
  },
  {
    path: '/',
    component: Layout,
    redirect: '/relations',
    name: 'Relations',
    children: [
      {
        path: 'relations',
        component: () => import('../views/relations')
      }
    ]
  },
  {
    path: '/',
    component: Layout,
    redirect: '/collect',
    name: 'Collect',
    children: [
      {
        path: 'collect',
        component: () => import('../views/collect')
      }
    ]
  },
  {
    path: '/',
    component: BlankLayout,
    redirect: '/setting',
    name: 'Setting',
    children: [
      {
        path: 'setting',
        component: () => import('../views/setting')
      }
    ]
  },
  {
    path: '/',
    component: BlankLayout,
    redirect: '/login',
    name: 'Login',
    children: [
      {
        path: 'login',
        component: () => import('../views/login')
      }
    ]
  }
]

export default new Router({
  routes: constantRouterMap
})

